exports.LectureDetail_ListVideoRelate = function(_args) {
	

	
	var view = Ti.UI.createView({
		
		height:_args.heightview,
		width:_args.widthview,
		left:_args.leftview,
		top:_args.topview,
		backgroundColor:'transparent',
		touchEnabled:true,
		backgroundImage:_args.backgroundImage
	});
	
	

	
    var viewheader = Ti.UI.createView({
    	backgroundImage: _args.backgroundImage_viewheader,
	    left: 0,
	    top: 0,
	    height:_args.height_viewheader,
	    width: '100%',//_args.width_viewheader,
	    touchEnabled: true,
	  
	});

	

	var lb1 = Titanium.UI.createLabel({
       text:_args.infolabel,
       color:'white',
       left:15,
       font:{
			fontSize:Ti.App.Properties.getString('fontsizeDefault'),
			fontWeight:'bold'
		},
       
    });
    viewheader.add(lb1)
	view.add(viewheader);
	
	
	
	var spaceimage=1,sizeimage=150
 	var scrollViewImage = Titanium.UI.createScrollView({
			contentWidth:'auto',
			contentHeight:'auto',
			top:viewheader.top+viewheader.height,
			width:'100%',
			height:_args.heightview-_args.height_viewheader,
			scrollType: 'horizontal',
			touchEnabled:true,
			
	});	
	
	
  

	var backgroundColor='red',left=0;
	
	
	for(var i = 0; i < _args.dataLectureArray.length; i++) {
		//if(i%2==0)  {backgroundColor='Red'} else{backgroundColor='Blue'} 
		//Lay cac bai giang cung chuong
		
		//&& _args.dataLectureArray[i].Id!=_args.dataLecture.Id 
			if(_args.dataLectureArray[i].IdChuong==_args.IdChuong )
			{
				var viewpanel = Titanium.UI.createView({
					
			       	left:left,
			        top:0,
			       	height:_args.heightview-_args.height_viewheader,
			        width:_args.widthview/4,
			        touchEnabled: true,
			        duration: 3000,
			        repeatCount: 0,
			     
			      	backgroundColor:'transparent',
			        borderRadius:0,
					borderColor:'White',
					borderWidth:1,
				
			       
			    });
				
				
				
				
				
				var lbLecture = Titanium.UI.createLabel({
			       text:_args.dataLectureArray[i].Name,
			       textAlign:'center',
			       color:'White',
			       
			       font:{
						fontSize:Ti.App.Properties.getString('fontsizeDefault'),
						//fontWeight:'bold'
					},
			       
			    });
			    viewpanel.add(lbLecture)
			    
			    viewpanel.addEventListener('touchstart', function(e)
				{
				   e.source.backgroundColor='#2981a3';
				});
				 
				viewpanel.addEventListener("touchend", function(e)
				{
					e.source.backgroundColor='transparent';
				});
				viewpanel.addEventListener("touchcancel", function(e)
				{
					e.source.backgroundColor='transparent';
				});
				
			
				viewpanel.addEventListener("click", function(e)
				{
					/*
					Ti.App.fireEvent('LectureDetail:CreateLectureDetail_Relate',
																{
																	LectureId:_args.dataLecture.LectureId,
																	TypeID:_args.dataLecture.IdLop,
																	LectureName:_args.dataLecture.Name,
																	Price:_args.dataLecture.Price,
																	TeacherImage:_args.dataLecture.TeacherImage,
																	IsSee:_args.dataLecture.IsSee,
																	IsDownload:_args.dataLecture.IsDownload,
																	dataLecture:_args.dataLecture,
																	dataLectureArray:_args.dataLectureArray	,  	
																}); 
																*/
				});
			    
				scrollViewImage.add(viewpanel);
				left+=_args.widthview/4
			}
	}
	

	
	
	
	
	
	view.add(scrollViewImage)
	return view;
};